const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('base_infomationbiddingpersonnel', {
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true,
      comment: "Id"
    },
    projectid: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "项目索引"
    },
    projectcorpid: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "建设单位索引"
    },
    managerid: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "人员索引"
    },
    managercode: {
      type: DataTypes.STRING(200),
      allowNull: false,
      comment: "人员证书编号"
    },
    managername: {
      type: DataTypes.STRING(50),
      allowNull: false,
      comment: "姓名"
    },
    managertel: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "人员联系电话"
    },
    managerpost: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "人员等级"
    },
    idcard: {
      type: DataTypes.STRING(20),
      allowNull: true,
      comment: "身份证号"
    },
    managertype: {
      type: DataTypes.INTEGER,
      allowNull: false,
      comment: "岗位"
    },
    managerscore: {
      type: DataTypes.DECIMAL(18,3),
      allowNull: false,
      comment: "分值"
    },
    bstatus: {
      type: DataTypes.INTEGER,
      allowNull: false
    },
    isrtuser: {
      type: DataTypes.STRING(50),
      allowNull: false,
      comment: "数据入库操作用户编号"
    },
    isrtusername: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "数据入库操作用户"
    },
    isrtdate: {
      type: DataTypes.DATE,
      allowNull: false,
      comment: "数据入库操作时间"
    },
    isdel: {
      type: DataTypes.BOOLEAN,
      allowNull: true,
      comment: "是否有效"
    },
    projectcode: {
      type: DataTypes.STRING(100),
      allowNull: false,
      comment: "项目编号"
    },
    isrtareacode: {
      type: DataTypes.STRING(20),
      allowNull: false,
      comment: "地区编码"
    },
    isunlock: {
      type: DataTypes.BOOLEAN,
      allowNull: true,
      comment: "是否解压"
    },
    maskFromV2: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "时间戳",
      field: 'mask_from_v2'
    },
    xmcount: {
      type: DataTypes.INTEGER,
      allowNull: true
    },
    delayjzdate: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "延迟解证时间"
    },
    duty: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "职责"
    },
    mark: {
      type: DataTypes.STRING(500),
      allowNull: true,
      comment: "备注"
    },
    lastsynctime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "同步时间"
    },
    keyguid: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "唯一编码"
    },
    projectguid: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目唯一编码"
    },
    startlocktime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "开始押证时间"
    },
    lastupdatetime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "上一次更新时间"
    },
    opttype: {
      type: DataTypes.STRING(20),
      allowNull: true,
      comment: "操作类别"
    },
    oldmangerguid: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    reasontype: {
      type: DataTypes.STRING(10),
      allowNull: true,
      comment: "修改原因类型"
    },
    forbidbidtype: {
      type: DataTypes.STRING(3),
      allowNull: true,
      comment: "禁止投标类型"
    },
    forbidbidbegintime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "禁止投标开始时间"
    },
    forbidbidendtime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "禁止投标结束时间"
    },
    managerchangetime: {
      type: DataTypes.DATE,
      allowNull: true
    },
    reasontitle: {
      type: DataTypes.STRING(500),
      allowNull: true
    },
    bmcorpguid: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    isDeleted: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "是否删除",
      field: 'is_deleted'
    },
    createdUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "创建人",
      field: 'created_user'
    },
    createdTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "本系统创建时间",
      field: 'created_time'
    },
    updatedUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "修改人",
      field: 'updated_user'
    },
    updatedTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "修改时间",
      field: 'updated_time'
    }
  }, {
    sequelize,
    tableName: 'base_infomationbiddingpersonnel',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
